Add a hover effect to all elements of a class [closed]
Posted
by
Em Sta
on Stack Overflow
See other posts from Stack Overflow
or by Em Sta
Published on 2013-06-21T07:46:50Z
Indexed on
2013/10/20
3:54 UTC
Read the original article
Hit count: 150
I made a simple website, it looks like this:
But, as you can see, the hover effect only works on where the mouse actually is! (here ipsum) But my aim is that the hover works on all elements! So i added a class with the hover effect p.hov:hover, but see it yourself:
<span id="motha">
<blockquote>
<p class="hov">Lorem</p>
<p class="hov" >ipsum</p>
<p class="hov" >dolor</p>
<p class="hov" >sit</p>
<p class="hov" >amen</p>
</blockquote>
</span>
p {
color:#f2f2f2;
background:#ff4a4a;
font-size: 75px;
line-height: 74px;
font-weight:700;
margin: 0 5px 24px;
float:left;
padding: 10px;
margin: 0 5px 24px;
font-family: 'Route', serif;
}
p.hov:hover {box-shadow:
1px 1px #666,
2px 2px #666,
3px 3px #666;}
Sorry for my english! And Thanks!
© Stack Overflow or respective owner